Operational and Denotational Semantics of Rewrite Programs
نویسندگان
چکیده
In this paper we present a new operational and denotational semantics for rewrite systems as logic programs. The main feature of our rewrite programs is that they allow us to define predicates not only by implications as in Prolog, but also by equivalences. We give a few examples showing how rewrite programs may turn out to be more effective than Prolog programs in capturing the user’s intended semantics, because of this additional feature. Rewrite programs are interpreted by linear completion. Our definition of linear completion differs from the previous one [10, 9], because we allow simplification of goals by their ancestors. If simplification is allowed, programs given by equivalences and programs given by implications show a different behaviour. In the second part of the paper we give a fixpoint characterization of rewrite programs and we show that it captures both the proof theoretic and the model theoretic semantics. Rewrite programs and Prolog programs for the same predicates have the same fixpoint, i.e. the same set of ground true facts, although a rewrite program may give fewer answers. We show that this happens because if predicates are defined by equivalences, distinct Prolog answers turn out to be equivalent with respect to the rewrite program. However, for every Prolog answer there is an equivalent answer given by the rewrite program. This explains why a smaller set of answers covers the same set of ground true facts.
منابع مشابه
On Rewrite Programs: Semantics and Relationship with Prolog
Rewrite programs are logic programs represented as rewrite rules, whose execution mechanism usually employs some version of Knuth-Bendix type completion. Rewrite programs allow one to express mutually exclusively defined predicates as well as those which are not. In this paper we demonstrate that rewrite programs, although denotationally equivalent to Prolog on the ground level, may produce few...
متن کاملThe rewriting logic semantics project
Rewriting logic is a flexible and expressive logical framework that unifies algebraic denotational semantics and structural operational semantics (SOS) in a novel way, avoiding their respective limitations and allowing succinct semantic definitions. The fact that a rewrite logic theory’s axioms include both equations and rewrite rules provides a useful “abstraction dial” to find the right balan...
متن کاملThe Semantics of the Combination ofAtomized
In this paper we deene a uniform language L that is an extension of the language underlying the process algebra PA. One of the main extensions of this language over PA is given by so-called atomizing brackets. If we place these brackets around a statement then we treat this statement as an atomic action. Put diierently, these brackets remove all interleaving points. We present a transition syst...
متن کاملSemantics of Interaction
The “classical” paradigm for denotational semantics models data types as domains, i.e. structured sets of some kind, and programs as (suitable) functions between domains. The semantic universe in which the denotational modelling is carried out is thus a category with domains as objects, functions as morphisms, and composition of morphisms given by function composition. A sharp distinction is th...
متن کاملFrom Mathematical Functions to Programs
@article{gdp:lcf-as-pl, author={Plotkin, G. D.}, title={LCF Considered as a Programming Language}, journal={Theoretical Computer Science}, pages={223--255}, year=1977 } Summary: Plotkin investigates the relation between the denotational and the operational semantics of a programming language. As a working example, he picks PCF a language based on Scott’s Logic of Computable Functions. He demons...
متن کامل